<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Firmata firmware for Arduino: firmata::FirmataParser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Firmata firmware for Arduino
   </div>
   <div id="projectbrief">Firmata is a protocol for communicating with microcontrollers from software on a host computer</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>firmata</b></li><li class="navelem"><a class="el" href="classfirmata_1_1_firmata_parser.html">FirmataParser</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfirmata_1_1_firmata_parser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">firmata::FirmataParser Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a40cc69b4997fad3335a34cc083894ea1"><td class="memItemLeft" align="right" valign="top"><a id="a40cc69b4997fad3335a34cc083894ea1"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>callbackFunction</b>) (void *context, uint8_t command, uint16_t value)</td></tr>
<tr class="separator:a40cc69b4997fad3335a34cc083894ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ba04f2773f1052fc014c93d309fe069"><td class="memItemLeft" align="right" valign="top"><a id="a7ba04f2773f1052fc014c93d309fe069"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>dataBufferOverflowCallbackFunction</b>) (void *context)</td></tr>
<tr class="separator:a7ba04f2773f1052fc014c93d309fe069"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cee4285d9cd5cdba702b720ae10a9b8"><td class="memItemLeft" align="right" valign="top"><a id="a6cee4285d9cd5cdba702b720ae10a9b8"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>stringCallbackFunction</b>) (void *context, const char *c_str)</td></tr>
<tr class="separator:a6cee4285d9cd5cdba702b720ae10a9b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f1b158e9366cdca7f9f743011359b13"><td class="memItemLeft" align="right" valign="top"><a id="a9f1b158e9366cdca7f9f743011359b13"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>sysexCallbackFunction</b>) (void *context, uint8_t command, size_t argc, uint8_t *argv)</td></tr>
<tr class="separator:a9f1b158e9366cdca7f9f743011359b13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0655dab3f791c7c46c8412ae13f0d3a"><td class="memItemLeft" align="right" valign="top"><a id="ad0655dab3f791c7c46c8412ae13f0d3a"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>systemCallbackFunction</b>) (void *context)</td></tr>
<tr class="separator:ad0655dab3f791c7c46c8412ae13f0d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6be4a3c92941c1de63b44918bbbda545"><td class="memItemLeft" align="right" valign="top"><a id="a6be4a3c92941c1de63b44918bbbda545"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>versionCallbackFunction</b>) (void *context, size_t sv_major, size_t sv_minor, const char *firmware)</td></tr>
<tr class="separator:a6be4a3c92941c1de63b44918bbbda545"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac8c388b593a00e88856646712beae68b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#ac8c388b593a00e88856646712beae68b">FirmataParser</a> (uint8_t *dataBuffer=(uint8_t *) NULL, size_t dataBufferSize=0)</td></tr>
<tr class="separator:ac8c388b593a00e88856646712beae68b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a754c97b890b7fd66c8d953a3e615acbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a754c97b890b7fd66c8d953a3e615acbf">parse</a> (uint8_t value)</td></tr>
<tr class="separator:a754c97b890b7fd66c8d953a3e615acbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67902b70695eaf0cf8f7b06175ca3902"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a67902b70695eaf0cf8f7b06175ca3902">isParsingMessage</a> (void) const</td></tr>
<tr class="separator:a67902b70695eaf0cf8f7b06175ca3902"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fbe143ddb428a97c00a15993c31a516"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a8fbe143ddb428a97c00a15993c31a516">setDataBufferOfSize</a> (uint8_t *dataBuffer, size_t dataBufferSize)</td></tr>
<tr class="separator:a8fbe143ddb428a97c00a15993c31a516"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a472a925ed7e626ed36dee94ceae45e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a2a472a925ed7e626ed36dee94ceae45e">attach</a> (uint8_t command, callbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:a2a472a925ed7e626ed36dee94ceae45e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae176414892a2d240b921c2b8037a8ade"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#ae176414892a2d240b921c2b8037a8ade">attach</a> (dataBufferOverflowCallbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:ae176414892a2d240b921c2b8037a8ade"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a239b37e09dea042d229fc2171d3a1979"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a239b37e09dea042d229fc2171d3a1979">attach</a> (uint8_t command, stringCallbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:a239b37e09dea042d229fc2171d3a1979"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa1d755b20b21e528bfa62d6a7c2dc0f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#aaa1d755b20b21e528bfa62d6a7c2dc0f">attach</a> (uint8_t command, sysexCallbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:aaa1d755b20b21e528bfa62d6a7c2dc0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affc821e7742d889965e61b248c204842"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#affc821e7742d889965e61b248c204842">attach</a> (uint8_t command, systemCallbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:affc821e7742d889965e61b248c204842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a876105f2203f5e8f1fb06c8236a96933"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a876105f2203f5e8f1fb06c8236a96933">attach</a> (uint8_t command, versionCallbackFunction newFunction, void *context=NULL)</td></tr>
<tr class="separator:a876105f2203f5e8f1fb06c8236a96933"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cd707386c0807bee733a3e27d161c7d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a7cd707386c0807bee733a3e27d161c7d">detach</a> (uint8_t command)</td></tr>
<tr class="separator:a7cd707386c0807bee733a3e27d161c7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a280ac17e428f8374afd30bce75e9a861"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfirmata_1_1_firmata_parser.html#a280ac17e428f8374afd30bce75e9a861">detach</a> (dataBufferOverflowCallbackFunction)</td></tr>
<tr class="separator:a280ac17e428f8374afd30bce75e9a861"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac8c388b593a00e88856646712beae68b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8c388b593a00e88856646712beae68b">&#9670;&nbsp;</a></span>FirmataParser()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FirmataParser::FirmataParser </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dataBuffer</em> = <code>(uint8_t&#160;*)NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dataBufferSize</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="classfirmata_1_1_firmata_parser.html">FirmataParser</a> class. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataBuffer</td><td>A pointer to an external buffer used to store parsed data </td></tr>
    <tr><td class="paramname">dataBufferSize</td><td>The size of the external buffer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae176414892a2d240b921c2b8037a8ade"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae176414892a2d240b921c2b8037a8ade">&#9670;&nbsp;</a></span>attach() <span class="overload">[1/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">dataBufferOverflowCallbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a buffer overflow callback </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newFunction</td><td>A reference to the buffer overflow callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="a2a472a925ed7e626ed36dee94ceae45e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a472a925ed7e626ed36dee94ceae45e">&#9670;&nbsp;</a></span>attach() <span class="overload">[2/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">callbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a generic sysex callback function to a command (options are: ANALOG_MESSAGE, DIGITAL_MESSAGE, REPORT_ANALOG, REPORT DIGITAL, SET_PIN_MODE and SET_DIGITAL_PIN_VALUE). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The ID of the command to attach a callback function to. </td></tr>
    <tr><td class="paramname">newFunction</td><td>A reference to the callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="a239b37e09dea042d229fc2171d3a1979"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a239b37e09dea042d229fc2171d3a1979">&#9670;&nbsp;</a></span>attach() <span class="overload">[3/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">stringCallbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a callback function for the STRING_DATA command. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>Must be set to STRING_DATA or it will be ignored. </td></tr>
    <tr><td class="paramname">newFunction</td><td>A reference to the string callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="aaa1d755b20b21e528bfa62d6a7c2dc0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa1d755b20b21e528bfa62d6a7c2dc0f">&#9670;&nbsp;</a></span>attach() <span class="overload">[4/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sysexCallbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a generic sysex callback function to sysex command. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The ID of the command to attach a callback function to. </td></tr>
    <tr><td class="paramname">newFunction</td><td>A reference to the sysex callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="affc821e7742d889965e61b248c204842"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affc821e7742d889965e61b248c204842">&#9670;&nbsp;</a></span>attach() <span class="overload">[5/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">systemCallbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a system callback function (supported options are: SYSTEM_RESET, REPORT_VERSION). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The ID of the command to attach a callback function to. </td></tr>
    <tr><td class="paramname">newFunction</td><td>A reference to the callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="a876105f2203f5e8f1fb06c8236a96933"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a876105f2203f5e8f1fb06c8236a96933">&#9670;&nbsp;</a></span>attach() <span class="overload">[6/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::attach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">versionCallbackFunction&#160;</td>
          <td class="paramname"><em>newFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attach a version callback function (supported option: REPORT_FIRMWARE). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The ID of the command to attach a callback function to. </td></tr>
    <tr><td class="paramname">newFunction</td><td>A reference to the callback function to attach. </td></tr>
    <tr><td class="paramname">context</td><td>An optional context to be provided to the callback function (NULL by default). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The context parameter is provided so you can pass a parameter, by reference, to your callback function. </dd></dl>

</div>
</div>
<a id="a280ac17e428f8374afd30bce75e9a861"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a280ac17e428f8374afd30bce75e9a861">&#9670;&nbsp;</a></span>detach() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::detach </td>
          <td>(</td>
          <td class="paramtype">dataBufferOverflowCallbackFunction&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Detach the buffer overflow callback </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">&lt;unused&gt;</td><td>Any pointer of type dataBufferOverflowCallbackFunction. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7cd707386c0807bee733a3e27d161c7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cd707386c0807bee733a3e27d161c7d">&#9670;&nbsp;</a></span>detach() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::detach </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>command</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Detach a callback function for a specified command (such as SYSTEM_RESET, STRING_DATA, ANALOG_MESSAGE, DIGITAL_MESSAGE, etc). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The ID of the command to detatch the callback function from. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a67902b70695eaf0cf8f7b06175ca3902"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67902b70695eaf0cf8f7b06175ca3902">&#9670;&nbsp;</a></span>isParsingMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FirmataParser::isParsingMessage </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Returns true if the parser is actively parsing data. </dd></dl>

</div>
</div>
<a id="a754c97b890b7fd66c8d953a3e615acbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a754c97b890b7fd66c8d953a3e615acbf">&#9670;&nbsp;</a></span>parse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FirmataParser::parse </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>inputData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Parse data from the input stream. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputData</td><td>A single byte to be added to the parser. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8fbe143ddb428a97c00a15993c31a516"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fbe143ddb428a97c00a15993c31a516">&#9670;&nbsp;</a></span>setDataBufferOfSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int FirmataParser::setDataBufferOfSize </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dataBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dataBufferSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Provides a mechanism to either set or update the working buffer of the parser. The method will be enabled when no buffer has been provided, or an overflow condition exists. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataBuffer</td><td>A pointer to an external buffer used to store parsed data </td></tr>
    <tr><td class="paramname">dataBufferSize</td><td>The size of the external buffer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_firmata_parser_8h_source.html">FirmataParser.h</a></li>
<li>FirmataParser.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
